<template>
  <div class="tabBox">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane v-if="this.menuList.includes('crisisList')" label="危机名单" name="crisisList">
        <crisis-list></crisis-list>
      </el-tab-pane>
      <el-tab-pane v-if="this.menuList.includes('schemeList')" label="危机方案处理" name="schemeList">
        <scheme-list></scheme-list>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import crisisList from './components/crisisList'
import schemeList from './components/schemeList'
export default {
  components: {
    schemeList,
    crisisList
  },
  data () {
    return {
      activeName: 'crisisList',
      activeList: ['crisisList', 'schemeList'],
      menuList: []
    }
  },
  created () {
    this.menuList = sessionStorage.getItem('list')
  },
  methods: {
    handleClick () {
      this.$cookies.set('activeName', this.activeName)
    }
  }
}
</script>
